Single mint
caution
V1 apis will be deprecated by 10th of Feb, 2023. Please do not use this in production. Please check V2 api
Collection of APIs to upload your assets to the IPFS and Mint them on the Polygon chain completely for free. Please follow the below steps to integrate the APIs into your DApp and start Minting through your own interface.
Base URL:
https://api.0xmint.io
https://api.mintnft.today (Deprecated, Please don't use this in production)
Step 1: Upload to IPFS
End point:
/v1/upload/single
Request type : form-data
| Headers | Type | Description |
|---|---|---|
| x-api-key | string | API key from dashboard |
| Parameters | Type | Description |
|---|---|---|
| metadata | String (JSON stringified) | Metadata of an NFT |
| image | file | The preview image for an NFT |
| asset | file | The actual NFT image |
info
Please refer the Opensea Metadata standards to understand how to format the metadata JSON
Example Response:
{
"data": {
"ipnft": "bafyreia536qt2jlndy5enqrgmzz5j5gnmqxjo6mmhcaiz7hop27a7ffidu",
"url": "ipfs://bafyreia536qt2jlndy5enqrgmzz5j5gnmqxjo6mmhcaiz7hop27a7ffidu/metadata.json"
}
}
Step 2: Initiate Mint
End point:
/v1/mint/single
Request type : application/json
| Headers | Type | Description |
|---|---|---|
| x-api-key | string | API key from dashboard |
| Parameters | Type | Description |
|---|---|---|
| wallet | string | Verified wallet address |
| type | string | ERC721 or ERC1155 |
| tokenCategory | string | soulbound or null |
| amount | integer | Number of supply for ERC1155 token type. Default value is 1 |
| network | string | "mainnet" |
| tokenUri | string | The token URI of the NFT to be minted |
Example Request:
{
"wallet": "0x2631e5e8717fAeaD0EBa72fEd5694aD1Fa0d3581",
"type": "ERC721", //or ERC1155
"network" : "mainnet",
"amount": 1,
"tokenCategory": "soulbound", //optional (Only applicable for type ERC721)
"tokenUri" : "ipfs://bafyreid2fspss5qtp32ulvbwu37wukwzjsjrctoay32fluxcjj44kfl7fi/metadata.json"
}
Example Responses:
{
"message": "NFT minted successfully",
"data": {
"wallet": "0x2631e5e8717fAeaD0EBa72fEd5694aD1Fa0d3581",
"tokenURI": "ipfs://bafyreibmxnleqmexxppzboatdx3452ughqnbhbyol5ih7dqulkz6z6ljae/metadata.json",
"type": "ERC721",
"supplyCount": 1,
"network": "mainnet",
"tokenCategory": null,
"transactionHash": "0x3c367447ab2b91e14ed6936ba69051db09c239b7fccf9721827d504f0b4cbe1f",
"tokenId": "385",
"status": "CONFIRMED",
"name": "test-polygon",
"imageType": "JPEG"
}
}
If the transaction doesn't go through for more than 30 seconds, the following response will be returned with status as "PENDING"
{
"data": {
"wallet": "0x2631e5e8717fAeaD0EBa72fEd5694aD1Fa0d3581",
"tokenURI": "ipfs://bafyreia536qt2jlndy5enqrgmzz5j5gnmqxjo6mmhcaiz7hop27a7ffidu/metadata.json",
"type": "ERC721",
"supplyCount": 1,
"network": "mainnet",
"transactionHash": "0xf7dbd16a6a77ea68892e107543f418b854aa985b47590bcdb492f6c6d98b2dfd",
"status": "PENDING"
}
}
Step 3 (Optional): Check status of pending transactions
End point:
/v1/biconomy/{transactionHash}
{
"code": 200,
"message": "Transaction status found",
"data": {
"oldHash": "0xf607f8fa6eb1bc104732865c198ffa3c09f9b986dff262a2277392623d8847ce",
"newHash": "0xf607f8fa6eb1bc104732865c198ffa3c09f9b986dff262a2277392623d8847ce",
"oldGasPrice": "2500000009",
"newGasPrice": "2500000009",
"newStatus": "CONFIRMED",
"retryCount": 0,
"relayerAddress": "0xf571dd57639f3781cf501e0dfb4287d74a8eff63",
"code": 200,
"message": "Use this new hash to serve to your users"
}
}
info
Please find all Smart Contarct addresses for the ERC721, ERC721-Soulbound and ERC1155 below. You can use these to fetch NFTs held by various wallets by querying the chain
ERC721: https://polygonscan.com/address/0x03e055692e77e56aBf7f5570D9c64C194BA15616
ERC721-Soulbound: https://polygonscan.com/address/0x42C091743f7B73b2F0043B1fb822b63Aaa05041B
ERC1155: https://polygonscan.com/address/0xe2f50189F8c1e3804AEb854C9eBFFB92Ba9d3270